﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Portal.API;
using System.Data;
using System.Text;

public partial class Modules_SampleModule_SampleControl : ModuleBase
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //if (!IsPostBack)
        //{
        //    LoadConfig();
        //}
       
    }
    protected override void OnInit(EventArgs e)
    {
        this.InitModule("", "", "SampleModule", "", true);
        LoadConfig();
        
        
        base.OnInit(e);
    }
    protected void LoadConfig()
    {

        DataSet ds = this.ReadConfig();


        //DataTable table = ds.Tables["Module"];
       // DataRow row = table.Rows[0];
        StringBuilder sb = new StringBuilder();
       // sb.Append(row["name_Text"].ToString());
       // sb.Append(row["position_Text"].ToString());
        GridView1.DataSource = ds;

        GridView1.DataBind();
        //Label2.Text = sb.ToString();
        //Label2.Text = this.ModuleConfigFile;

        
       
       // Label2.Text = (Portal.API.Language.GetText(this, "ErrorWritingModulesConfig"));
    }

    
}
